<template>
  <div>
    <h1>{{msg}}</h1>
    <h2>{{title}}</h2>
    <button @click="showMsg">点击提示msg</button>
    <button @click="hello">问候一下</button>
  </div>
</template>

<script>
// 引入混合
import { m1,m2,m3 } from '../mixins';
export default {
    name: 'Demoa',
    data() {
        return {
            msg: 'Hello Demoa',
            title: 'hahahah'
        }
    },
    created() {
        console.log('created!')
    },
    mounted(){
        console.log('mounted!')
    },
    methods: {
        hello() {
            console.log('Hello!')
        }
    },
    // 注册混合，之后就可以直接使用
    mixins: [m1,m2,m3]

}
</script>

<style>

</style>